package run.siyuan.jdk.设计模式.装饰模式.装饰模式案例3;

/**
 * @className: Decorator
 * @Description: TODO 装饰模式-修饰的抽象类
 * @author: siyuan
 * @date: 2022/3/21 10:38 上午
 */
public class Decorator extends SchoolReport {
    //首先我要知道是哪个成绩单
    private SchoolReport schoolReport;

    //构造函数，传递成绩单过来
    public Decorator(SchoolReport sr) {
        this.schoolReport = sr;
    }

    //成绩单还是要被看到的
    public void report() {
        this.schoolReport.report();
    }

    //看完还是要签名的
    public void sign(String name) {
        this.schoolReport.sign(name);
    }
}